package com.other;

/**
 * @author :Mr.zhou
 * @description: TODO edit class Description
 * @create date: 2025/1/5 20:56
 */
public class Testa {
    public static void main(String[] args) {
        count(2);
        count(4);
        count(6);
        count(10);
    }

    public static int count(int n) {
        if (n == 0) {
            return 1;
        }
        int result = 1;
        for (int i = 1; i <= n; i++) {
            result *= i;
        }
        System.out.println(n+"! = "+result);
        return result;
    }
}
